package com.axend.aerosense.base.utils;

import com.axend.aerosense.base.BaseModuleInit;

import java.util.Map;

/**
 * @author: ChenHongWei
 * Date: 2020/8/26
 */
public class Values {

    private static Map<String, String> flagMap;

    public static final String WIFI_NAME_PREFIX = "AS_";
//    public static final String WIFI_NAME = "office";

    //固件文件路径
//    public static final String FIRMWARE_PATH = BaseModuleInit.getAppContext().getCacheDir().getAbsolutePath() + "/firmware";
    public static final String FIRMWARE_PATH = BaseModuleInit.getAppContext().getCacheDir() + "/firmware";

    /**
     * ********************************************
     *                                            *
     * 雷达参数设置                                 *
     *                                            *
     **********************************************/
    //头部
    public static final String HEAD = "AAAA5555";
    public static final byte[] HEAD_BYTE = {(byte) 0xAA, (byte) 0xAA, 0x55, 0x55};

    //标识符
    //public static final String SET_RID = "0001";  //设置雷达ID
    public static final String GET_RID = "0002";  //获取雷达ID

    public static final String SET_WORK_DISTANCE = "0003";  //设置工作距离
    public static final String GET_WORK_DISTANCE = "0004";  //获取工作距离

    public static final String SET_WARING_DELAYED = "0005";  //设置雷达报警时间
    public static final String GET_WARING_DELAYED = "0006";  //获取雷达报警时间

    public static final String SET_COLLECT_GATE_STATE = "0007";  //快速切换到STA模式

    public static final String SET_NO_GO_HOME_DELAYED = "0008";  //设置雷达外出多久未回报警时间
    public static final String GET_NO_GO_HOME_DELAYED = "0009";  //获取雷达外出多久未回报警时间

    public static final String SET_WIFI_INFO = "000A";  //设置家庭WIFI名和密码

    public static final String GET_HARDWARE_VERSION = "000B";  //查询雷达硬件版本号

    public static final String SET_DEVICE_HEIGHT = "0019";  //设置雷达安装高度
    public static final String GET_DEVICE_HEIGHT = "001A";  //获取雷达安装高度

    public static final String START_FIRMWARE_UPDATE = "0016";  //开始固件升级
    public static final String SEND_FIRMWARE_DATA = "0017";  //固件数据发送中
    public static final String UPDATE_SUCCESS = "0018";  //固件升级下发完成，通知雷达升级完成

    public static final String SET_RADAR_IP_PORT = "000C";  //设置雷达IP地址与端口

    //设备固件升级标识tag
    public static final String UPDATE_COMMAND = "20001";

    //数据位
    public static final String SET_SUCCESS = "00000001";  //设置成功
    public static final String SET_FAIL = "00000000";  //设置失败

    public static final String GET_DATA = "00000000";  //获取数据


//    static {
//        flagMap = new HashMap<>();
//        flagMap.put("0001", SET_RID);
//        flagMap.put("0002", GET_RID);
//        flagMap.put("0003", SET_WORK_DISTANCE);
//        flagMap.put("0004", GET_WORK_DISTANCE);
//        flagMap.put("0005", SET_WARING_DELAYED);
//        flagMap.put("0006", GET_WARING_DELAYED);
//        flagMap.put("0007", SET_COLLECT_GATE_STATE);
//        flagMap.put("0008", SET_NO_GO_HOME_DELAYED);
//        flagMap.put("0009", GET_NO_GO_HOME_DELAYED);
//        flagMap.put("000A", SET_WIFI_INFO);
//        flagMap.put("000B", GET_HARDWARE_VERSION);
//        flagMap.put("UPDATE_COMMAND", UPDATE_COMMAND);
//    }
//
//    /**
//     * 根据flag获取对应的标识
//     * @param flag
//     * @return
//     */
//    public static int getFlag(String flag) {
//        return flagMap.get(flag);
//    }

}
